<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv=”X-UA-Compatible” content=”IE=7″ />
<title><?php wp_title(''); if (is_search()) { ?> Search for <?php echo $s; } if ( !(is_404()) and (is_search()) or (is_single()) or (is_page()) or (function_exists('is_tag') and is_tag()) or (is_archive()) ) { ?> at <?php } ?> <?php bloginfo('name'); ?></title>
<?php $options = get_option('eachBlue_options'); ?>
<?php
if (is_home()) {
	$description = $options['description'];
	$keywords = $options['keywords'];
	$author = $options['author'];
} else if (is_single()) {
	$description =  $post->post_title;
	$author = $options['author'];
	$keywords = "";
	$tags = wp_get_post_tags($post->ID);
	foreach ($tags as $tag ) {
		$keywords = $keywords . $tag->name . ", ";
	}	
	} else if (is_category()) {
		$description = category_description();
	}
?>
<meta name="keywords" content="<?=$keywords?>" />
<meta name="description" content="<?=$description?>" />
<meta name="Author" content="<?=$author?>" />
<link rel="icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" type="images/x-icon" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<script type="text/javascript" src="<?php bloginfo('url'); ?>/wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js.js"></script>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
</head>
<body>
  <div id="wrapper">
   <div id="header">
    <div id="top">
	 <div id="logo">
	 <h1><a href="<?php echo get_settings('home'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" /></a>
	 </h1>
	 </div>
	 <div id="notice">
	   <?php $options = get_option('eachBlue_options'); ?>
	   <?php if ($options['notice']) : ?>
	   <p class="notice-text">
		<span><?php echo($options['notice_content']); ?></span>
	   </p>
	   <p class="auther-img"><a href="<?php echo get_settings('home'); ?>" alt="<?php bloginfo('name'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/touxiang.png" /></a>
	   </p>
	   <?php endif; ?>
	 </div>
    </div><!-- end top -->	
     <div id="nav">
      <ul>
      	<li class="<?php echo($home_menu); ?> page_item nobg"><span><a title="<?php _e('Home', 'eachBlue'); ?>" href="<?php echo get_settings('home'); ?>/"><?php _e('Home', 'eachBlue'); ?></a></span></li>
      	<?php
        	$pages = wp_list_pages('sort_column=menu_order&title_li=&echo=0');
        	$pages = preg_replace('%<a ([^>]+)>%U','<span><a $1>', $pages);
        	$pages = str_replace('</a>','</a></span>', $pages);
        	echo $pages;
        ?>
      </ul>
      <div class="searchbar"><?php get_search_form(); ?></div>
</div>
</div><!-- End header -->